#ifndef _FIG_TOOL_BONE_PRODUCER_H_
#define _FIG_TOOL_BONE_PRODUCER_H_


#include "math/vec2.h"
#include <vector>
#include <string>


class FIGToolBoneProducer
{
public:

	FIGToolBoneProducer();
	~FIGToolBoneProducer();

		

	

	struct PartTable
	{
		 int			m_ID;
		 float			m_Rotation;
		 math::Vec2		m_CenterRelative;

		 PartTable() : m_ID(0),
						m_Rotation(0)
		 {

		 }

	};

	struct WayPoint
	{
	  int			m_ID;
	  math::Vec2	m_Pos;

	  WayPoint(): m_ID(0)
	  {

	  }
	};

	struct StepTable
	{
		std::vector<FIGToolBoneProducer::PartTable*>		m_PartTables;
		int													StepID;
		float												Duration;

		StepTable() : StepID(0),
					  Duration(0.5f)
		{

		};
	};



	void							Export(const std::string& Name);
					

protected:

	void							Clear();
	void							ReadFile(const std::string& FileName);
	int								AddToBoneTable(const std::string& Name);
	void							ExportFileList();

	std::vector<StepTable*>			m_Animation;
	std::vector<std::string>		m_BoneTable;
	int								m_CurrentStepID;

	std::vector<WayPoint*>			m_WayPoints;
	std::vector<std::string>		m_BoneFileNames;
};


#endif
